package com.api.gbhg.liuwenbo.version2.dao;

import weaver.conn.RecordSet;

/**
 * @Description
 * @Author
 * @Date
 */
public class DataBaseUtil2 {

    /**
     * 查询单位名称
     * @param id
     * @return
     */
    public static String getSubcompanyNameById(String id){
        RecordSet rts=new RecordSet();
        String sql="select SUBCOMPANYNAME from hrmsubcompany where id="+id;
        rts.executeQuery(sql);
        rts.next();
        return rts.getString("SUBCOMPANYNAME");
    }

    /**
     * 获取拱北海关
     * @return
     */
    public static String getGonBeiSubCompany(){
        RecordSet rs = new RecordSet();
        String sql = "select id from HrmSubCompany";
        rs.executeQuery(sql);
        rs.next();
        return rs.getString("id");
    }
}
